<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        var arr = [1, 2, 3, 60]
        var arr2 = [1, 2, 3]

        function has(a, b) {
            var sum = false
            if (a.indexOf(b) != -1) {
                sum = true
                // console.log(sum)
            }
            return sum
        }

        console.log(has(arr, 60))
        console.log(has(arr2, 60))
    </script>
</body>

</html>